package com.book.service;

import com.book.dao.fixDao;
import com.book.po.fix;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class fixService {

    @Autowired
    private com.book.dao.fixDao fixDao;

    public List<fix> fix_select(String sid){
        return fixDao.fix_select(sid);
    };
//
    public String fix_insert(fix fix){
        if (fixDao.fix_insert(fix)!=0){
            return "报修成功";
        }else {
            return "报修失败";
        }
    };
//
//    public String book_delete(Integer bookId){
//        if (bookDao.book_delete(bookId)!=0){
//            return "删除成功";
//        }else {
//            return "删除失败";
//        }
//    }
//
    public String fix_count(int id){
        if (fixDao.fix_count(id)!=0){
            return "确认成功，报修人数增加！";
        }else {
            return "确认失败";
        }
    }
}
